﻿

<div>
    <form name="cameraManageCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.cameraManage.id">编辑信息:{{vm.cameraManage.name}}</span>
                <span ng-if="!vm.cameraManage.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">


            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="CameraName" ng-class="{'edited':vm.cameraManage.cameraName}" ng-model="vm.cameraManage.cameraName" maxlength="100" />
                <label>@L("CameraName")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="FaultContacts" ng-class="{'edited':vm.cameraManage.faultContacts}" ng-model="vm.cameraManage.faultContacts" maxlength="50" />
                <label>@L("FaultContacts")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="ContactNumber" ng-class="{'edited':vm.cameraManage.contactNumber}" ng-model="vm.cameraManage.contactNumber" maxlength="50" />
                <label>@L("ContactNumber")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="CameraId" ng-class="{'edited':vm.cameraManage.cameraId}" ng-model="vm.cameraManage.cameraId" />
                <label>摄像机ID</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Status" ng-class="{'edited':vm.cameraManage.status}" ng-model="vm.cameraManage.status" />
                <label>在线状态</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="ChannelType" ng-class="{'edited':vm.cameraManage.channelType}" ng-model="vm.cameraManage.channelType" />
                <label>通道类型</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="ChannelSN" ng-class="{'edited':vm.cameraManage.channelSN}" ng-model="vm.cameraManage.channelSN" />
                <label>ChannelSN</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Rights" ng-class="{'edited':vm.cameraManage.rights}" ng-model="vm.cameraManage.rights" />
                <label>设备权限</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="CameraType" ng-class="{'edited':vm.cameraManage.cameraType}" ng-model="vm.cameraManage.cameraType" />
                <label>摄像机类型</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="CtrlId" ng-class="{'edited':vm.cameraManage.ctrlId}" ng-model="vm.cameraManage.ctrlId" />
                <label>CtrlId</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Latitude" ng-class="{'edited':vm.cameraManage.latitude}" ng-model="vm.cameraManage.latitude" />
                <label>纬度</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Longitude" ng-class="{'edited':vm.cameraManage.longitude}" ng-model="vm.cameraManage.longitude" />
                <label>经度</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="ViewDomain" ng-class="{'edited':vm.cameraManage.viewDomain}" ng-model="vm.cameraManage.viewDomain" />
                <label>域名</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="CameraFunctions" ng-class="{'edited':vm.cameraManage.cameraFunctions}" ng-model="vm.cameraManage.cameraFunctions" />
                <label>摄像机功能</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="MulticastIp" ng-class="{'edited':vm.cameraManage.multicastIp}" ng-model="vm.cameraManage.multicastIp" />
                <label>组播IP</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="MulticastPort" ng-class="{'edited':vm.cameraManage.multicastPort}" ng-model="vm.cameraManage.multicastPort" />
                <label>组播端口</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="NvrChnlIp" ng-class="{'edited':vm.cameraManage.nvrChnlIp}" ng-model="vm.cameraManage.nvrChnlIp" />
                <label>NvrChnlIp</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="ChannelRemoteType" ng-class="{'edited':vm.cameraManage.channelRemoteType}" ng-model="vm.cameraManage.channelRemoteType" />
                <label>通道遥控类型</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="SubMulticastIp" ng-class="{'edited':vm.cameraManage.subMulticastIp}" ng-model="vm.cameraManage.subMulticastIp" />
                <label>SubMulticastIp</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="SubMulticastPort" ng-class="{'edited':vm.cameraManage.subMulticastPort}" ng-model="vm.cameraManage.subMulticastPort" />
                <label>SubMulticastPort</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="TownID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.cameraManage.townID" ng-change="vm.bindArea(vm.cameraManage.townID)" required>
                    <option ng-repeat="x in vm.townList" value="{{x.id}}" ng-selected="vm.cameraManage.townID==x.id">{{x.title}}</option>
                </select>
                <label>乡镇</label>
                <span class="help-block">     @L("TownID")@L("MustBe_Required")</span>
            </div>


            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="AreaID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.cameraManage.areaID" ng-change="vm.bindVillage(vm.cameraManage.areaID)" required>
                    <option ng-repeat="x in vm.areaList" value="{{x.id}}" ng-selected="vm.cameraManage.areaID==x.id">{{x.title}}</option>
                </select>
                <label>社区</label>
                <span class="help-block">     @L("AreaID")@L("MustBe_Required")</span>
            </div>


            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen3">
                <select name="VillageID" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.cameraManage.villageID" required>
                    <option ng-repeat="x in vm.villageList" value="{{x.id}}" ng-selected="vm.cameraManage.villageID==x.id">{{x.title}}</option>
                </select>
                <label>村庄</label>
                <span class="help-block">     @L("VillageID")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="Remarks" ng-class="{'edited':vm.cameraManage.remarks}" ng-model="vm.cameraManage.remarks" maxlength="500" />
                <label>备注</label>
            </div>

        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="cameraManageCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>